Current Location: Home> Function Categories> decbin

decbin

Convert decimal to binary
Name:decbin
Category:math
Programming Language:php
One-line Description:Convert decimal to binary.

Definition and usage

decbin() function converts decimal to binary.

Example

 <?php
echo decbin ( "3" ) ;
echo decbin ( "1" ) ;
echo decbin ( "1587" ) ;
echo decbin ( "7" ) ;
?>

Try it yourself

grammar

 decbin ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing a binary representation of the given dec_number parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is 32 strings of 1.

Similar Functions
Popular Articles